FROM node:18

# 设置工作目录
WORKDIR /app

# 复制 .output 目录到镜像中的 /app 目录
COPY .output /app

WORKDIR /app/server
  
RUN npm config set registry https://registry.npmmirror.com/

RUN npm install -g cnpm --registry=http://registry.npm.taobao.org

RUN cnpm i

CMD ["node", "/app/server/index.mjs"]